let arr = [
    {
        id:'1',
        name:'张三'
    },
    {
        id:2,
        name:'李四'
    },
    {
        id:3,
        name:'王五'
    }
  ];
  // 使用map()生成数组
  let newArr = arr.map(obj => {return obj.name})
  console.log('newArr',newArr);
  // 输出 ['张三','李四','王五']
